DEPTH = ../..

include $(DEPTH)/scripts/Makefile

SRCS        = SQLiteStreamDemo.cxx
LIBS        = -lTimestamp -lStreams

DATABASE    = demo.db

demo: clean all runDemo checkDemo

runDemo: 
	@$(SCRIPTS_DIR)/progress 'Run Demo'
	@./SQLiteStreamDemo

checkDemo: 
	@$(SCRIPTS_DIR)/progress 'Check Demo'
	@../sqlite3/SQLiteDemo $(DATABASE) "SELECT * FROM demo_stream_1"
	@../sqlite3/SQLiteDemo $(DATABASE) "SELECT * FROM demo_stream_2"

all: SQLiteStreamDemo

SQLiteStreamDemo: $(SRCS)
	@$(SCRIPTS_DIR)/progress 'Building Demo'
	@$(GPP) $(CFLAGS) $? $(LDFLAGS) $(LIBS) -o $@

clean: 
	@$(SCRIPTS_DIR)/progress 'Cleaning'
	@rm -f SQLiteStreamDemo
	@rm -f $(DATABASE)
